package cn.edu.scau.dropship.mapper;

import cn.edu.scau.dropship.entity.Store_goods;
import cn.edu.scau.dropship.entity.Store_goodsExample;
import java.util.List;
import org.apache.ibatis.annotations.Arg;
import org.apache.ibatis.annotations.ConstructorArgs;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface Store_goodsMapper {
    @SelectProvider(type=Store_goodsSqlProvider.class, method="countByExample")
    long countByExample(Store_goodsExample example);

    @DeleteProvider(type=Store_goodsSqlProvider.class, method="deleteByExample")
    int deleteByExample(Store_goodsExample example);

    @Insert({
        "insert into store_goods (storeid, goodsid)",
        "values (#{storeid,jdbcType=INTEGER}, #{goodsid,jdbcType=INTEGER})"
    })
    int insert(Store_goods record);

    @InsertProvider(type=Store_goodsSqlProvider.class, method="insertSelective")
    int insertSelective(Store_goods record);

    @SelectProvider(type=Store_goodsSqlProvider.class, method="selectByExample")
    @ConstructorArgs({
        @Arg(column="storeid", javaType=Integer.class, jdbcType=JdbcType.INTEGER),
        @Arg(column="goodsid", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
    })
    List<Store_goods> selectByExample(Store_goodsExample example);

    @UpdateProvider(type=Store_goodsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Store_goods record, @Param("example") Store_goodsExample example);

    @UpdateProvider(type=Store_goodsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Store_goods record, @Param("example") Store_goodsExample example);
}